import request from '@/utils/request'


// 根据ID获取法律文档详情
export function getLegalDocumentById(id) {
  return request({
    url: '/legalDocuments/legalDocuments/public/'+id,
    method: 'get'
  })
}

// 获取所有法律文档的标题列表
export function getAllLegalTitles() {
  return request({
    url: '/legalDocuments/legalDocuments/public/titles',
    method: 'get'
  })
}

// 查询法律文档列表
export function listLegalDocuments(query) {
  return request({
    url: '/legalDocuments/legalDocuments/list',
    method: 'get',
    params: query
  })
}

// 查询法律文档详细
export function getLegalDocuments(id) {
  return request({
    url: '/legalDocuments/legalDocuments/' + id,
    method: 'get'
  })
}

// 新增法律文档
export function addLegalDocuments(data) {
  return request({
    url: '/legalDocuments/legalDocuments',
    method: 'post',
    data: data
  })
}

// 修改法律文档
export function updateLegalDocuments(data) {
  return request({
    url: '/legalDocuments/legalDocuments',
    method: 'put',
    data: data
  })
}

// 删除法律文档
export function delLegalDocuments(id) {
  return request({
    url: '/legalDocuments/legalDocuments/' + id,
    method: 'delete'
  })
}
